<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"<?php if (isset($addbg)){ ?> class="addbg"<?php } ?>>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=7" />
        <title>管理中心 - <?php echo C("SITE_NAME"); ?></title>
        <css href="__PUBLIC__/Admin/css/reset.css" />
        <css href="__PUBLIC__/Admin/css/system.css" />
        <css href="__PUBLIC__/Admin/css/table_form.css" />
        <js href="__PUBLIC__/Admin/js/jquery.min.js" />
        <js href="__PUBLIC__/Admin/js/admin_common.js" />

        <!--kindeditor begin-->
        <css href="__PUBLIC__/Admin/kindeditor/themes/default/default.css" />
        <js href="__PUBLIC__/Admin/kindeditor/kindeditor.js" />
        <js href="__PUBLIC__/Admin/kindeditor/lang/zh_CN.js" />
        <script type="text/javascript">
            KindEditor.ready(function(K) {
                var editor = K.editor({
                    uploadJson : '<?php echo U('uploadJson'); ?>',
                    fileManagerJson : '<?php echo U('fileManagerJson'); ?>',
                    allowFileManager : true,
                    formatUploadUrl : false,
                    extraFileUploadParams: {
                        PHPSESSID: '<?php echo session_id(); ?>',
                    }
                });

                //上传缩略图
                K('#J_UploadBanner').click(function() {
                    editor.loadPlugin('image', function() {
                        editor.plugin.imageDialog({
                            showRemote : false,
                            imageUrl : K('#J_UploadBannerPic').val(),
                            clickFn : function(url, title, width, height, border, align) {
                                K('#J_UploadBannerPic').val(url);
                                editor.hideDialog();
                            }
                        });
                    });
                });
            });
        </script>
    </head>
    <body>
        <style type="text/css">
            html{_overflow-y:scroll}
        </style>
        <script type="text/javascript">
            //显示新闻资讯左侧栏目
            window.top.$("#display_center_id").hide();
        </script>
<div class="subnav">
    <div class="content-menu ib-a blue line-x">
    	<a href="<?php echo U('SinglePageCategory/index'); ?>"><em>栏目管理</em></a>
        <span>|</span>
        <a class="on" href="javascript:void(0);"><em>修改栏目</em></a>
    </div>
</div>

<div class="common-form">
<form name="myform" id="myform" action="<?php echo U('SinglePageCategory/update'); ?>" method="post">
<table width="100%" class="table_form contentWrap">
    <tr>
    	<th width="200">上级栏目：</th>
        <td>
            <select name="SinglePageCategory[parent_id]" >
                <option value="0">作为一级栏目</option><?php echo $category_list; ?>
            </select>
        </td>
    </tr>
    <tr>
        <th>栏目名称：</th>
        <td><input type="text" name="SinglePageCategory[name]" id="name" class="input-text" value="<?php echo $category_info['name']; ?>" ></td>
    </tr>
    <tr>
        <th>描述：</th>
        <td><textarea name="SinglePageCategory[description]" style="width:700px; height:60px;"><?php echo $category_info['description']; ?></textarea></td>
    </tr>
    <tr>
        <th>图片：</th>
        <td>
            <input type="text" class="input-text" id="J_UploadBannerPic" name="SinglePageCategory[pic]" value="<?php echo $category_info['pic']; ?>" style="width:250px;">
            <input type="button" class="button" id="J_UploadBanner" value="本地上传">
            <span class="tip">图片尺寸：340x335(px)</span>
            <?php if (!empty($category_info['pic'])) { ?>
                <img src="<?php echo $category_info['pic']; ?>" width="80" height="40">
            <?php } ?>
        </td>
    </tr>
    <tr>
        <th>mobile端展示：</th>
        <td>
            <?php if ($category_info['type'] == "1") { ?>
                <input type="radio" name="SinglePageCategory[type]" value="1" checked> 是 <input type="radio" name="SinglePageCategory[type]" value="0"> 否
            <?php } else { ?>
                <input type="radio" name="SinglePageCategory[type]" value="1"> 是 <input type="radio" name="SinglePageCategory[type]" value="0" checked> 否
            <?php } ?>
            </if>
        </td>
    </tr>
    <tr>
        <th>是否显示栏目：</th>
        <td>
            <?php if ($category_info['is_on'] == "1") { ?>
        	<input type="radio" name="SinglePageCategory[is_on]" value="1" checked> 是 <input type="radio" name="SinglePageCategory[is_on]" value="0"> 否
            <?php } else { ?>
        	<input type="radio" name="SinglePageCategory[is_on]" value="1"> 是 <input type="radio" name="SinglePageCategory[is_on]" value="0" checked> 否
            <?php } ?>
        </if>
        </td>
    </tr>
</table>
<!--table_form_off-->
<div class="bk15"></div>
<div class="btn">
<input name="SinglePageCategory[id]" value="<?php echo $category_info['id']; ?>" type="hidden">
<input type="submit" id="dosubmit" class="button" name="dosubmit" value="提交"/>
</div>
</form>
</div>

</body>
</html>